<template>
  <div>
    <input type="text" ref="inputRef">
    <!-- ref表示dom引用 -->
    <div ref="divEle">father</div>
    <!-- ref表示组件引用，也就是获取组件实例对象 -->
    <test ref='testCom'></test>
  </div>
</template>
<script>
import test from './components/test.vue'
export default {
  components: {
    test
  },
  mounted() {
    // console.log(this.$refs.divEle);

    // console.log(this.$refs.testCom.msg);

    this.$refs.inputRef.focus()
  }
}
</script>
<style>
  
</style>